﻿using System.ServiceModel;
using VideoStore.Services.Dto;
using VideoStore.Common.Response;

namespace VideoStore.Services.Interface
{
    [ServiceContract(Namespace = "VideoStore.Services.CustomerService")]
    public interface ICustomerService
    {
        /// <summary>
        /// Gets the customer by id.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns></returns>
        [OperationContract]
        Response<CustomerDto> GetCustomerById(int id);

        /// <summary>
        /// Creates the customer.
        /// </summary>
        /// <param name="newCustomer">The new customer.</param>
        /// <returns></returns>
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Response<CustomerDto> CreateCustomer(CustomerDto newCustomer);
    }
}